REST Resource: projects.locations.processors

Resource: Processor

The first-class citizen for Document AI. Each processor defines how to extract structural information from a document.

JSON representation
{
  "name": string,
  "type": string,
  "displayName": string,
  "state": enum (State),
  "defaultProcessorVersion": string,
  "processEndpoint": string,
  "createTime": string,
  "kmsKeyName": string
}
Fields
name

string

Output only. Immutable. The resource name of the processor. Format: projects/{project}/locations/{location}/processors/{processor}

type

string

The processor type, e.g., OCR_PROCESSOR, INVOICE_PROCESSOR, etc. To get a list of processors types, see locations.fetchProcessorTypes.

displayName

string

The display name of the processor.

state

enum (State)

Output only. The state of the processor.

defaultProcessorVersion

string

The default processor version.

processEndpoint

string

Output only. Immutable. The http endpoint that can be called to invoke processing.

createTime

string (Timestamp format)

The time the processor was created.

A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".

kmsKeyName

string

The KMS key used for encryption/decryption in CMEK scenarios. See https://cloud.google.com/security-key-management.

State

The possible states of the processor.

Enums
STATE_UNSPECIFIED The processor is in an unspecified state.
ENABLED The processor is enabled, i.e., has an enabled version which can currently serve processing requests and all the feature dependencies have been successfully initialized.
DISABLED The processor is disabled.
ENABLING The processor is being enabled, will become ENABLED if successful.
DISABLING The processor is being disabled, will become DISABLED if successful.
CREATING The processor is being created, will become either ENABLED (for successful creation) or FAILED (for failed ones). Once a processor is in this state, it can then be used for document processing, but the feature dependencies of the processor might not be fully created yet.
FAILED The processor failed during creation or initialization of feature dependencies. The user should delete the processor and recreate one as all the functionalities of the processor are disabled.
DELETING The processor is being deleted, will be removed if successful.

Methods

batchProcess

LRO endpoint to batch process many documents.

create

Creates a processor from the type processor that the user chose.

delete

Deletes the processor, unloads all deployed model artifacts if it was enabled and then deletes all artifacts associated with this processor.

disable

Disables a processor

enable

Enables a processor

get

Gets a processor detail.

list

Lists all processors which belong to this project.

process

Processes a single document.

setDefaultProcessorVersion

Set the default (active) version of a Processor that will be used in ProcessDocument and BatchProcessDocuments.