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:
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.
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.}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-10 UTC."],[[["\u003cp\u003eThis endpoint, \u003ccode\u003eprojects.locations.processors.dataset.batchDeleteDocuments\u003c/code\u003e, allows for the deletion of a set of documents within a dataset.\u003c/p\u003e\n"],["\u003cp\u003eThe request must specify the dataset resource name in the path parameters, formatted as \u003ccode\u003eprojects/{project}/locations/{location}/processors/{processor}/dataset\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eDocuments for deletion are specified in the request body, either via a \u003ccode\u003efilter\u003c/code\u003e to match multiple documents or by providing a list of \u003ccode\u003edocumentIds\u003c/code\u003e, with a maximum of 50 documents allowed in a batch when using documentIds.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful deletion requests will return an \u003ccode\u003eOperation\u003c/code\u003e object, and the request requires \u003ccode\u003edocumentai.datasets.deleteDocuments\u003c/code\u003e IAM permission on the dataset.\u003c/p\u003e\n"],["\u003cp\u003eThe endpoint also requires the \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope to be authorized.\u003c/p\u003e\n"]]],[],null,["# Method: dataset.batchDeleteDocuments\n\n**Full name**: projects.locations.processors.dataset.batchDeleteDocuments\n\nDeletes a set of documents.\n\n### HTTP request\n\n`POST https://{endpoint}/v1beta3/{dataset}:batchDeleteDocuments`\n\nWhere `{endpoint}` is one of the [supported service endpoints](/document-ai/docs/reference/rest#rest_endpoints).\n\n### Path parameters\n\n### Request body\n\nThe request body contains data with the following structure:\n\n### Response body\n\nIf successful, the response body contains an instance of [Operation](/document-ai/docs/reference/rest/Shared.Types/ListOperationsResponse#Operation).\n\n### Authorization scopes\n\nRequires the following OAuth scope:\n\n- `https://www.googleapis.com/auth/cloud-platform`\n\nFor more information, see the [Authentication Overview](https://cloud.google.com/docs/authentication/).\n\n### IAM Permissions\n\nRequires the following [IAM](https://cloud.google.com/iam/docs) permission on the `dataset` resource:\n\n- `documentai.datasets.deleteDocuments`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs).\n\nBatchDatasetDocuments\n---------------------\n\nDataset documents that the batch operation will be applied to.\n\nIndividualDocumentIds\n---------------------\n\nList of individual DocumentIds."]]