Method: projects.locations.processors.process

Processes a single document.

HTTP request

POST https://documentai.googleapis.com/v1/{name=projects/*/locations/*/processors/*}:process

The URL uses gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. The resource name of the Processor or ProcessorVersion to use for processing. If a Processor is specified, the server will use its default version. Format: projects/{project}/locations/{location}/processors/{processor}, or projects/{project}/locations/{location}/processors/{processor}/processorVerions/{processorVersion}

Authorization requires one or more of the following IAM permissions on the specified resource name:

  • documentai.processors.processOnline
  • documentai.processorVersions.processOnline

Request body

The request body contains data with the following structure:

JSON representation
{
  "skipHumanReview": boolean,

  // Union field source can be only one of the following:
  "inlineDocument": {
    object (Document)
  },
  "rawDocument": {
    object (RawDocument)
  }
  // End of list of possible types for union field source.
}
Fields
skipHumanReview

boolean

Whether Human Review feature should be skipped for this request. Default to false.

Union field source. The document payload. source can be only one of the following:
inlineDocument

object (Document)

An inline document proto.

rawDocument

object (RawDocument)

A raw document content (bytes).

Response body

If successful, the response body contains an instance of ProcessResponse.

Authorization Scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires one of the following IAM permissions on the name resource, depending on the resource type:

  • documentai.processors.processOnline
  • documentai.processorVersions.processOnline

For more information, see the IAM documentation.