Method: dataset.getDocument

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

Returns relevant fields present in the requested document.

HTTP request

GET https://{endpoint}/v1beta3/{dataset}:getDocument

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

Path parameters

Parameters
dataset

string

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

Query parameters

Parameters
documentId

object (DocumentId)

Required. Document identifier.

readMask

string (FieldMask format)

If set, only fields listed here will be returned. Otherwise, all fields will be returned by default.

This is a comma-separated list of fully qualified names of fields. Example: "user.displayName,photo".

pageRange

object (DocumentPageRange)

List of pages for which the fields specified in the readMask must be served.

Request body

The request body must be empty.

Response body

If successful, the response body contains data with the following structure:

JSON representation
{
  "document": {
    object (Document)
  }
}
Fields
document

object (Document)

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.getDocuments

For more information, see the IAM documentation.

DocumentPageRange

Range of pages present in a document.

JSON representation
{
  "start": integer,
  "end": integer
}
Fields
start

integer

First page number (one-based index) to be returned.

end

integer

Last page number (one-based index) to be returned.