Required. The resource name of the Processor to change default version. It takes the form projects/{project}/locations/{location}/processors/{processor}.
Authorization requires the following IAM permission on the specified resource processor:
documentai.processors.processBatch
Request body
The request body contains data with the following structure:
JSON representation
{"defaultProcessorVersion": string}
Fields
defaultProcessorVersion
string
Required. The resource name of child ProcessorVersion to use as default. Format: projects/{project}/locations/{location}/processors/{processor}/processorVersions/{version}
Response body
If successful, the response body contains an instance of Operation.
[[["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 API endpoint \u003ccode\u003eprojects.locations.processors.setDefaultProcessorVersion\u003c/code\u003e sets the active version of a specified Document AI Processor.\u003c/p\u003e\n"],["\u003cp\u003eThe HTTP request to set the default processor version is a \u003ccode\u003ePOST\u003c/code\u003e request directed to a specific endpoint URL that includes the processor's resource name.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eprocessor\u003c/code\u003e path parameter, a required string, identifies the target processor, with authorization necessitating \u003ccode\u003edocumentai.processors.processBatch\u003c/code\u003e IAM permission.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003edefaultProcessorVersion\u003c/code\u003e field in the request body is a required string specifying the child ProcessorVersion resource to be made default.\u003c/p\u003e\n"],["\u003cp\u003eSuccessful requests return an Operation instance and require the \u003ccode\u003edocumentai.processors.update\u003c/code\u003e IAM permission, as well as \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e OAuth scope.\u003c/p\u003e\n"]]],[],null,["# Method: processors.setDefaultProcessorVersion\n\n**Full name**: projects.locations.processors.setDefaultProcessorVersion\n\nSet the default (active) version of a [Processor](/document-ai/docs/reference/rest/v1/projects.locations.processors#Processor) that will be used in [processors.process](/document-ai/docs/reference/rest/v1/projects.locations.processors/process#google.cloud.documentai.v1.DocumentProcessorService.ProcessDocument) and [processors.batchProcess](/document-ai/docs/reference/rest/v1/projects.locations.processors/batchProcess#google.cloud.documentai.v1.DocumentProcessorService.BatchProcessDocuments).\n\n### HTTP request\n\n`POST https://{endpoint}/v1/{processor}:setDefaultProcessorVersion`\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 `processor` resource:\n\n- `documentai.processors.update`\n\nFor more information, see the [IAM documentation](https://cloud.google.com/iam/docs)."]]